package ycl.common.models;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;

import java.util.List;

/**
 * 分页查询
 *
 * @author YCL
 * @date 2021-08-31 20:57:08
 */
@Data
public class QueryPage<T> {

	private int current;

	private int size;

	private int total;

	private List<T> records;


	public QueryPage(Page<T> page) {
		this.current = (int) page.getCurrent();
		this.size = (int) page.getSize();
		this.total = (int) page.getTotal();
		this.records = page.getRecords();
	}

	public QueryPage() {
	}
}
